import type { Configuration as DevServerConfiguration } from "webpack-dev-server"
import { BuildOptions } from "./types/types";
export function buildDevServer (options: BuildOptions): DevServerConfiguration {
  return {
    port: options.port,
    open: true,
    historyApiFallback: true,
    hot: true,
    proxy: {
      '/api': {
        target: "https://telemed.yourfavorite.agency",
        logLevel: 'debug',
        secure: false,
        changeOrigin: true,
      }
    }
  }
}
